package com.itheima.admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @Author longbosheng
 * @Date 2022/6/15 15:49
 * @PackageName:com.itheima.pojo
 * @ClassName: Flavors
 * @Description: TODO
 * @Version 1.0
 */
@Data
@TableName("flavors")
@Component
public class Flavors {
    @TableId(value ="id",type = IdType.ASSIGN_ID)
    private String id;
    @TableField(value = "dish_id")
    private String dishId;
    private String name;
    private String value;
    @TableField(exist = false,select = false)
    private boolean showOption;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time")
    private Date createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time")
    private Date updateTime;
    @TableField(value = "create_user")
    private String createUser;
    @TableField(value = "update_user")
    private String updateUser;
    @TableField(value = "is_deleted")
    private int isDeleted;
}
